import { request } from './request'

// 上传文件分析
export function analysis(data) {
    return request({
        url: '/analysis/analysis',
        method: 'post',
        data: data,
        headers: {
            'Content-Type': 'multipart/form-data'
        }
    })
}

// 获取查询到的文件列表
export function getResAnalysis(fileCode) {
    return request({
        url: '/analysis/getResAnalysis',
        method: 'post',
        data: fileCode,
        headers: {
            "Content-Type": "text/plain"
        }
    });
}

// 获取表一数据
export function getOneFileResult(fileNameList) {
    return request({
        url: '/analysis/getOneFileResult',
        method: 'post',
        data: fileNameList,
        headers: {
            "Content-Type": "application/json"
        }
    });
}

// 获取表二数据
export function getOneFileAnalysis(fileNameList) {
    return request({
        url: '/analysis/getOneFileAnalysis',
        method: 'post',
        data: fileNameList,
        headers: {
            "Content-Type": "application/json"
        }
    });
}

// 获取表一数据
export function createTable1(fileNameList) {
    return request({
        url: '/analysis/createTable1',
        method: 'post',
        data: fileNameList,
        headers: {
            "Content-Type": "application/json"
        }
    });
}

// 获取表二数据
export function createTable2(fileNameList) {
    return request({
        url: '/analysis/createTable2',
        method: 'post',
        data: fileNameList,
        headers: {
            "Content-Type": "application/json"
        }
    });
}

// 获取标注文件下载路径
export function getHighlightUrl(fileNameList) {
    return request({
        url: '/analysis/getHighlightUrl',
        method: 'post',
        data: fileNameList,
        headers: {
            "Content-Type": "application/json"
        }
    });
}

// 获取总表数据
export function getTotalResult(page) {
    return request({
        url: '/analysis/getTotalResult',
        method: 'post',
        data: page,
        headers: {
            "Content-Type": "application/json"
        }
    });
}